//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
   imgSrc:"../../utils/images/xcx.png",
    items: [
      { msg: "1" },
      { msg: "2" }
    ],
    num:1,
    param:"index"
  },
  //事件处理函数
  bindViewTap: function() {

  },
  onLoad: function () {
    console.log("加载")
  },
  onShow: function(){
    console.log("显示")
  },
  onReady:function(){
    console.log("渲染")
  },
  onHide:function(){
    console.log("隐藏")
  },
  onUnload:function(){
    console.log("卸载")
  },
  actionFn:function(){
    wx.redirectTo({ url: '../test/test?id=1'})
  },
  add:function(){
    console.log(this.data.num)
    this.data.num+=1;
    this.setData({
      num: this.data.num
    })
  },
  bindEvt:function(e){
    console.log(e)
    console.log(e.currentTarget.dataset.txt)
  },
  paramFn:function(){
    if (this.data.param == "index"){
      this.data.param = "setting"
    }else{
      this.data.param = "index"
    }
    this.setData({
      param: this.data.param
    })
  },
  toggleToast:function(e){
    console.log(e)
  },
  getUserInfo: function(e) {
    
  }
})
